<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>企业人事管理系统-添加部门</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" href="../../static/css/font.css">
	<link rel="stylesheet" href="../../static/css/weadmin.css">
	<link rel="stylesheet" href="./index.css">
	<script src="../../lib/layui/layui.js" charset="utf-8"></script>
	<script src="../../static/js/util/util.js"></script>
	<script src="../../static/js/jquery.1.11.3.min.js"></script>
	<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
	<!--[if lt IE 9]>
	      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
	      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
	    <![endif]-->
</head>

<body>
	<div class="weadmin-nav">
		<span class="layui-breadcrumb">
			<a href="">首页</a>
			<a href="">部门管理</a>
			<a>
				<cite>添加部门</cite>
			</a>
		</span>
		<a class="layui-btn layui-btn-sm" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);"
		 title="刷新">
			<i class="layui-icon" style="line-height:30px">ဂ</i>
		</a>
	</div>
	<div class="weadmin-body container">
		<form class="layui-form formContainer" id="deptForm">
			<div class="layui-form-item">
				<label for="name" class="layui-form-label">
					<span class="we-red">*</span>部门名称
				</label>
				<div class="layui-input-inline input-item">
					<input type="text" id="name" name="name" required="" lay-verify="required" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item input-item">
				<label for="remark" class="layui-form-label">
					<span class="we-red">*</span>详细描述
				</label>
				<div class="layui-input-inline">
					<input type="text" id="remark" name="remark" required="" lay-verify="required" autocomplete="off" class="layui-input">
				</div>
			</div>
			<div class="layui-form-item">
				<div class="layui-input-block layui-form">
					<input type="radio" name="status" value="1" title="启用" checked/>
					<input type="radio" name="status" value="2" title="禁用" />
				</div>
			</div>
		</form>
		<div class="btnBox" style="margin-left: 110px">
			<button class="layui-btn layui-btn-lg" onclick="addDept()">添加</button>
		</div>
	</div>
	<script>
		layui.extend({
			admin: '{/}../../static/js/admin'
		});
        //各种基于事件的操作，下面会有进一步介绍
		layui.use('form', function () {
			var form = layui.form;
		});
		function addDept() {
			post('/department/addDept',$("#deptForm").serialize(),function (data) {
                layer.msg(data);
            })
        }
	</script>
</body>

</html>